package com.ysh.gsm;

import java.io.Serializable;
import java.util.Arrays;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Id;

/**
 * @author ysh
 *
 */
@Embeddable

public class CdrCmPK  implements Serializable {


	private static final long serialVersionUID = 1060494754747275722L;
	
	private int cellId;
	private int sequence;
	
	
	public CdrCmPK() {
		super();
	}
	@Id	
	@Column(name = "cell_id", nullable = false)
	public int getCellId() {
		return cellId;
	}
	public void setCellId(int cellId) {
		this.cellId = cellId;
	}
	@Id	
	@Column(name = "sequence", nullable = false)
	public int getSequence() {
		return sequence;
	}
	public void setSequence(int sequence) {
		this.sequence = sequence;
	}
	public int hashCode() {
		 return Arrays.hashCode(new Object[] {
			        cellId, sequence 
			    });
	}
	public boolean equals(Object obj) {
		if (obj == this) {
			return true;
		}
		if (!(obj instanceof CdrCmPK)) {
			return false;
		}
		if (null == obj) {
			return false;
		}
		CdrCmPK pk = (CdrCmPK) obj;
		return (pk.cellId == cellId && pk.sequence == sequence);
	}

}
